package com.doordu.entity;

/**
 * @author zxw
 * @date 2020/8/20 17:07
 */
public class Car {
    private String door;
    private String wheel;
    private Integer wheelNum;
    private Integer seatNum;

    public Car(String door, String wheel, Integer wheelNum, Integer seatNum) {
        this.door = door;
        this.wheel = wheel;
        this.wheelNum = wheelNum;
        this.seatNum = seatNum;
    }

    public static Builder builder() {
        return new Builder();
    }

    public static class Builder {
        private String door;
        private String wheel;
        private Integer wheelNum;
        private Integer seatNum;

        public Builder with(String wheel) {
            this.wheel = wheel;
            return this;
        }

        public Builder with(Integer wheelNum) {
            this.wheelNum = wheelNum;
            return this;
        }

        public Builder setDoor(String door) {
            this.door = door;
            return this;
        }

        public Builder setSeatNum(Integer seatNum) {
            this.seatNum = seatNum;
            return this;
        }

        public Car build() {
            return new Car(door, wheel, wheelNum, seatNum);
        }
    }
}
